# **********************************************************************
#
# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

# Ice version 3.3.1
# Generated from file `Session.ice'

import Ice, IcePy, __builtin__

if not Ice.__dict__.has_key("_struct_marker"):
    Ice._struct_marker = object()

# Start of module Glacier2
_M_Glacier2 = Ice.openModule('Glacier2')
__name__ = 'Glacier2'

if not _M_Glacier2.__dict__.has_key('CannotCreateSessionException'):
    _M_Glacier2.CannotCreateSessionException = Ice.createTempClass()
    class CannotCreateSessionException(Ice.UserException):
        def __init__(self, reason=''):
            self.reason = reason

        def ice_name(self):
            return 'Glacier2::CannotCreateSessionException'

        def __str__(self):
            return IcePy.stringifyException(self)

        __repr__ = __str__

    _M_Glacier2._t_CannotCreateSessionException = IcePy.defineException('::Glacier2::CannotCreateSessionException', CannotCreateSessionException, (), None, (('reason', (), IcePy._t_string),))
    CannotCreateSessionException.ice_type = _M_Glacier2._t_CannotCreateSessionException

    _M_Glacier2.CannotCreateSessionException = CannotCreateSessionException
    del CannotCreateSessionException

if not _M_Glacier2.__dict__.has_key('Session'):
    _M_Glacier2.Session = Ice.createTempClass()
    class Session(Ice.Object):
        def __init__(self):
            if __builtin__.type(self) == _M_Glacier2.Session:
                raise RuntimeError('Glacier2.Session is an abstract class')

        def ice_ids(self, current=None):
            return ('::Glacier2::Session', '::Ice::Object')

        def ice_id(self, current=None):
            return '::Glacier2::Session'

        def ice_staticId():
            return '::Glacier2::Session'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def destroy(self, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_Glacier2._t_Session)

        __repr__ = __str__

    _M_Glacier2.SessionPrx = Ice.createTempClass()
    class SessionPrx(Ice.ObjectPrx):

        def destroy(self, _ctx=None):
            return _M_Glacier2.Session._op_destroy.invoke(self, ((), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_Glacier2.SessionPrx.ice_checkedCast(proxy, '::Glacier2::Session', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_Glacier2.SessionPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_Glacier2._t_SessionPrx = IcePy.defineProxy('::Glacier2::Session', SessionPrx)

    _M_Glacier2._t_Session = IcePy.defineClass('::Glacier2::Session', Session, (), True, None, (), ())
    Session.ice_type = _M_Glacier2._t_Session

    Session._op_destroy = IcePy.Operation('destroy', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (), (), None, ())

    _M_Glacier2.Session = Session
    del Session

    _M_Glacier2.SessionPrx = SessionPrx
    del SessionPrx

if not _M_Glacier2.__dict__.has_key('SessionManager'):
    _M_Glacier2.SessionManager = Ice.createTempClass()
    class SessionManager(Ice.Object):
        def __init__(self):
            if __builtin__.type(self) == _M_Glacier2.SessionManager:
                raise RuntimeError('Glacier2.SessionManager is an abstract class')

        def ice_ids(self, current=None):
            return ('::Glacier2::SessionManager', '::Ice::Object')

        def ice_id(self, current=None):
            return '::Glacier2::SessionManager'

        def ice_staticId():
            return '::Glacier2::SessionManager'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def create(self, userId, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_Glacier2._t_SessionManager)

        __repr__ = __str__

    _M_Glacier2.SessionManagerPrx = Ice.createTempClass()
    class SessionManagerPrx(Ice.ObjectPrx):

        def create(self, userId, _ctx=None):
            return _M_Glacier2.SessionManager._op_create.invoke(self, ((userId, ), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_Glacier2.SessionManagerPrx.ice_checkedCast(proxy, '::Glacier2::SessionManager', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_Glacier2.SessionManagerPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_Glacier2._t_SessionManagerPrx = IcePy.defineProxy('::Glacier2::SessionManager', SessionManagerPrx)

    _M_Glacier2._t_SessionManager = IcePy.defineClass('::Glacier2::SessionManager', SessionManager, (), True, None, (), ())
    SessionManager.ice_type = _M_Glacier2._t_SessionManager

    SessionManager._op_create = IcePy.Operation('create', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string),), (), _M_Glacier2._t_SessionPrx, (_M_Glacier2._t_CannotCreateSessionException,))

    _M_Glacier2.SessionManager = SessionManager
    del SessionManager

    _M_Glacier2.SessionManagerPrx = SessionManagerPrx
    del SessionManagerPrx

# End of module Glacier2
